import QtQuick 2.0

Item { id: button
    width: 16
    height: 16
    property alias icon: iconImg.source
    signal clicked()
    Image { id: iconImg; smooth: true; antialiasing: true
        anchors.fill: parent
        Behavior on scale { NumberAnimation { duration: 50; } }
    }
    MouseArea {
        anchors.fill: parent
        onClicked: button.clicked()
        onPressed: iconImg.scale = 0.9; onReleased: iconImg.scale = 1.0
    }
}
